<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width= , initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../js/vue.js"></script>
<body>
    <div id="app">   
       <cpn><span>标题</span></cpn>     
       <cpn>
            <button slot="left">返回</button>
            <span slot="center">标题</span>
       </cpn> 
    </div>
    <template id="cpn">
        <div>
          <h2>我是子组件</h2>
          <slot name="left"><span>左边</span></slot>
          <slot name="center"><span>中间</span></slot>
          <slot name="right"><span>右边</span></slot>
          <slot><span>哈哈哈</span></slot>
          <slot><span>哈哈哈</span></slot>
        </div>
      </template>
    <script>
       
        const app = new Vue({
            el: '#app',    
            data: {    
            },
            methods: {
                btnClick() {
                    
                }
            },
            components: {
                cpn: {
                    template: "#cpn"
                }
            }
            


        })
        
        

    </script>

    
</body>
</html>